%{

#include <stdio.h>

%}
NUM [1-9]+[0-9]*|0
%%

{NUM}  		        printf("NUM %s ",yytext);
"<="                printf("LES&E ");
">="                printf("GRE&E ");
"=="                printf("EQL ");
"!="                printf("NEQ ");
"&&"                printf("AND ");
"||"                printf("OR ");
"!"                 printf("NOT ");
"<"  	            printf("LES ");
">"                 printf("GRE ");
"("					printf("LPA ");
")"					printf("RPA ");
[ \t]+

%%

int main() {
    char input[1024];
    printf("Input: ");
    fgets(input, sizeof(input), stdin);
    YY_BUFFER_STATE state = yy_scan_string(input);
    printf("Output: ");
    yylex();
    yy_delete_buffer(state);
    return 0;
}

int yywrap() {
    return 1;
}
